[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
<= Less Than or Equal To Relational Operator
<exp1> <= <exp2>
The <= operator is a relational operator, yielding a Boolean value
(TRUE or FALSE). If <exp1> has a value less than or equal to <exp2>,
the result is TRUE; otherwise, the result is FALSE. Note that this
operator is not defined for sets or pointers.
For integers and reals, ordering is well defined. For Char, Boolean,
and enumerated types, it is based on the ordinal value (Ord(exp1) <=
Ord(exp2)). For strings, it is based on lexical order. The ordinal
value of each character of the first string is compared to the ordinal
value of its corresponding character in the second string, until there
is a mismatch or one of the strings terminates. For example, 'Zoo' <=
'able' is TRUE, since 'Z' has a lower ASCII code than 'a'.
<exp1>,<exp2> Any expression of type Real, Integer, Char, Boolean,
enumerated, set, pointer, or string. Both expressions
must be the same type. Real, Byte, and Integer types
may be mixed.
-------------------------------- Example ---------------------------------
3.4 <= 3.5 { returns TRUE }
'sail' <= 'sailor' { returns TRUE }
'big' <= 'Big' { returns FALSE }
3 <= 3.0 { returns TRUE }
See Also:
=
<
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson